package iot.core.data;

import com.baomidou.mybatisplus.core.metadata.IPage;
import iot.core.data.entity.HTCls;
import lombok.Data;

import java.util.List;

@Data
public class PageData<T> {
    private  long Total=0;
    private List<T> Data;

    public static <T> PageData<T> fromIPage(IPage<T> ip){
        var r=new PageData<T>();
        r.setTotal(ip.getTotal());
        r.setData(ip.getRecords());
        return r;
    }
}
